Skip to main content

UI

The application is using React as the main UI framework. It follows a separation into three subgroups:

  • Components: Building blocks of the app. Should be decoupled from most services and reusable (with minor or no modifications) in other projects
  • Containers: They contain more bussiness logic related to the app
  • Views: Can think of them as the root components of the routes, e.g. pages or modals.

** Some services can not be called from the container. i.e.: getTranslation

To be able to configure the presentation from your CMS, there are several mappings defined to choose different available components. These are defined in src/config/templates.js.

If you want to create a new component, ideally it will follow these principles:

  • Decoupled from third party services: That way it increases its reusability
  • Including Storybook stories: This allows for more efficient debugging for UI issues, which can get complex when doing directly in the app
  • Including unit tests: Components are usually relatively simple to test which can bring more confidence when changing

If you use Accedo One as the CMS, you can map the new component to a template value.

Performance Considerations

Performance is sometimes a limiting factor, especially in TV applications, where special attention has to be paid when using React. Here we list some of the most important ones: